package com.moorror.codegenvel.utils;

import javax.swing.*;
import java.util.function.Consumer;
import java.util.function.Supplier;

/**
 * @Author jiyanghuang
 * @Date 2025/8/15 22:33
 */
public class JPanelUtils {

    public static void fillTextToObj(String text, Consumer<String> consumer) {
        consumer.accept(text);
    }

    public static void fillObjToText(Supplier<String> supplier, JTextField tf) {
        String content = supplier.get();
        if (null == content) {
            content = "";
        }
        tf.setText(content);
    }
}
